home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- import wx
-
- def border(dc, rect, top = True, bottom = True, left = True, right = True, rounded = False, size = None):
- dc.SetPen(wx.BLACK_PEN)
- if top and bottom and left and right:
- dc.SetBrush(wx.TRANSPARENT_BRUSH)
- if rounded:
- dc.DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, rounded)
- else:
- dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height)
- else:
- pen_width = dc.GetPen().GetWidth()
- bottompos = rect.y + rect.height - pen_width
- rightpos = rect.x + rect.width - pen_width
- if top:
- dc.DrawLine(rect.x, rect.y, rightpos, rect.y)
-
- if bottom:
- dc.DrawLine(rect.x, bottompos, rightpos, bottompos)
-
- if left:
- dc.DrawLine(rect.x, rect.y, rect.x, bottompos)
-
- if right:
- dc.DrawLine(rightpos, rect.y, rightpos, bottompos)
-
-
-